import ContextPool from "../common/tool/context/ContextPool";
import LayerBase from "../expand/ui/LayerBase";
import GameSnake from "./GameSnake";
import { IGameState } from "./IGameState";
import LayerGameOver from "./ui/LayerGameOver";
const { ccclass, property } = cc._decorator;
@ccclass
export default class GameUi extends cc.Component implements IGameState {
    @property(cc.Prefab)
    public LayerGameOver: cc.Prefab = null;

    private mContent: ContextPool = null;
    public init(content: ContextPool) {
        this.mContent = content;
    }

    public onGameStart(): void {
    }

    public onGameWin(): void {
    }

    public onGameOver(): void {
        let layer = LayerBase.Create(LayerGameOver, this.LayerGameOver);
        layer.initOver(this.mContent.getInstance(GameSnake));
    }

    public onGamePause(): void {

    }

    public onGameResume(): void {

    }

    public onGameRestart(): void {

    }

    public onGameRevive(): void {

    }
}
